package org.pi.common.snippets

object RunScalaScriptFromScala {
	def main(args: Array[String]) : Unit = {
		println("START RunScalaScriptFromScala");
		val scriptCode : String = """
val x = 5;
println("Hello World, and hello x=="+x);
""";
//		def onScriptError(errorMessage:String):Unit = { println(errorMessage); }
//		val scriptSettings = new scala.tools.nsc.GenericRunnerSettings( onScriptError(_) )
//		val scriptArgs = args.toList
//		scala.tools.nsc.ScriptRunner.runCommand(scriptSettings, scriptCode, scriptArgs)

//		org.pi.common.scripting.ScalaTool.interpret(scriptCode);
//		org.pi.common.scripting.ScalaTool.interpret(scriptCode);
//		org.pi.common.scripting.ScalaTool.interpret(scriptCode);
		
		println("END RunScalaScriptFromScala");
	}
}
